<?php
/**
 * Created by PhpStorm.
 * User: iqgmy
 * Date: 2020/10/23
 * Time: 2:02 PM
 */
namespace app\channel\model;
use app\BaseModel;
use think\facade\Cache;
use think\Db;
//*------------------------------------------------------ */
//-- 签约合同
/*------------------------------------------------------ */
class ContractModel extends BaseModel
{
    protected $table = 'channel_proxy_contract';
    public $pk = 'id';
    protected $autoWriteTimestamp = true;

    /*------------------------------------------------------ */
    //-- 获取签约合同
    /*------------------------------------------------------ */
    public function getContractByUserIdAndProxyId($user_id, $proxy_id)
    {
        $where[] = ['user_id','=', $user_id];
        $where[] = ['proxy_id','=', $proxy_id];
        return $this->where($where)->find();
    }

}